package cn.zhuzi.keep.test;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class Demo1 {
	public static void main(String[] args) throws IOException {
		// 5686a163d96d482152cdc5b5
		// 56834a0b7d803e4c3a5cd367
		String url = "https://api.gotokeep.com/social/v2/people/5686a163d96d482152cdc5b5/followings";
		Connection connect = Jsoup.connect(url);
		Map<String, String> headMap = new HashMap<String, String>();

		headMap.put(
				"Authorization",
				"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJfaWQiOiI1NjgzNGEwYjdkODAzZTRjM2E1Y2QzNjciLCJ1c2VybmFtZSI6IuerueWtkDUxIiwiYXZhdGFyIjoiaHR0cDovL3N0YXRpYzEuZ290b2tlZXAuY29tL2F2YXRhci8yMDE1LzEyLzMwLzExLzc5YjA1OWVjNWQzOGI1M2M2NTE0MGYyZDUyNzQwMzljMDNlZGM0OWUuanBnIiwiZ2VuZGVyIjoiTSIsImRldmljZUlkIjoiODY5MDE0MDI4NDg3OTQxNjgzZTM0YzRmOGU0MTExMTEwYzJhZjQyOSIsImlzcyI6Imh0dHA6Ly93d3cuZ290b2tlZXAuY29tLyIsImV4cCI6MTUzMTU3NTM4NiwiaWF0IjoxNTIyOTM1Mzg2fQ.cZepoPPf_DnStLUQjjeJnxbnWCIrQf8ILJA0AFVZA3s");
		headMap.put("x-user-id", "56834a0b7d803e4c3a5cd367");

		connect.headers(headMap);
		Document document = connect.ignoreContentType(true).get();
		System.out.println(document.body().html());
	}
}
